home *** CD-ROM | disk | FTP | other *** search
- Path: mayne.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
- Subject: Re: C or C++ for a 14-year old? The definitive reply
- Date: 23 Jan 1996 14:20:29 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4e3mvdINNpi3@mayne.ugrad.cs.ubc.ca>
- References: <4cve3a$f0n@news.iconn.net> <4b30ld$lp2$1@mhafc.production.compuserve.com> <qq91jhhtbr.fsf@tartarus.ucsd.edu> <4danli$llb@news.onramp.net>
- NNTP-Posting-Host: mayne.ugrad.cs.ubc.ca
-
- In article <4danli$llb@news.onramp.net>, Rick Lutowski <oa@iah.com> wrote:
- >thecrow@iconn.net (The Crow) wrote:
- >>Whether you start with C or C++ is irrelevant, learning one will allow you to
- >>learn the other with ease.
- >
- >This is true of the syntax, but not of the methodology or theory
- >behind them. C and C++ are two totally different languages
- >conceptually, in spite of their surface similarity.
- >
- >If you know C and are thinking about learning C++, first go to
- >a local university library, find some papers written by David
- >Parnas, and read them to learn about information-hiding. Then
- >go on to some of the other OO authors like Booch to learn about
- >classes and inheritance, polymorphism and dynamic binding.
- >Once you think you understand those concepts, you are ready to
- >learn C++.
-
- I know about those things, and can practice most of them under C.
- It's not entirely clear that any real benefits are derived from frills like
- language support for polymorphism and inheritance.
-
- Information hiding leads to inefficiencies---and you _can_ have it in C, by the
- way. Even the C preprocessor lets you have efficient information hiding, if you
- use it with discipline. It's cheaper to access elements of a function via
- macros than be forced to communicate via abstract function calls. The only
- advantage that information hiding gives you is that 1) you can change the
- implementation of the data structure easily without recompiling modules that
- use it (big deal). 2) you have more control over how your software gets used. I
- think it's point 2 that is the chief motivation, because it allows capitalists
- to have better control over the production and trade of software.
-
- The concepts of object oriented design and programming transcend the choice of
- programming language. Once can practice sound OO design with C, if one is so
- inclined.
- --
-
-